﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DeviceLib.Device
{
    /// <summary>
    /// UserControl1.xaml 的交互逻辑
    /// </summary>
    public partial class MotionSensor : BaseControl, Interfaces.ISensor
    {
        public MotionSensor(Control father)
        {
            InitializeComponent();
            basePlateform = father;
            baseSize = new Point(200, 200);
        }


        public void AnalysisGram(byte[] gram)
        {
            throw new NotImplementedException();
        }

        public byte[] GetConfigAddressGram(int newAddr)
        {
            throw new NotImplementedException();
        }

        public string GetDeviceName()
        {
            return "移动感应器";
        }

        public byte[] GetSuperviseGram()
        {
            throw new NotImplementedException();
        }

        public void SetDeviceLocation(double positionX, double positionY)
        {
            if (positionX < basePlateform.Width && positionY < basePlateform.Height)
            {
                X = positionX;
                Y = positionY;
            }
        }

        private void Ellipse_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
        {
            throw new NotImplementedException();
        }
    }
}
